package com.lnlyj.media;

import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;

import com.lnlyj.media.data.MediaItem;

/**
 * wanglei 2020-04-18
 */
public class ResultData implements Parcelable {

    private String path;
    private Uri uri;
    private boolean fullImage;

    public ResultData(MediaItem item, boolean fullImage) {
        this.path = item.getPath();
        this.uri = item.getUri();
        this.fullImage = fullImage;
    }

    protected ResultData(Parcel in) {
        path = in.readString();
    }

    public static final Creator<ResultData> CREATOR = new Creator<ResultData>() {
        @Override
        public ResultData createFromParcel(Parcel in) {
            return new ResultData(in);
        }

        @Override
        public ResultData[] newArray(int size) {
            return new ResultData[size];
        }
    };

    public String getPath() {
        return path;
    }

    public Uri getUri() {
        return uri;
    }

    public boolean isFullImage() {
        return fullImage;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(path);
    }
}
